package com.xiaol.business.controller;

import com.xiaol.business.model.Student;
import com.xiaol.business.service.student.StudentService;
import com.xiaol.framework.result.ResultUtil;
import com.xiaol.framework.result.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping(value = "/student")
public class StudentController {

    @Autowired
    StudentService studentService;


    @RequestMapping("queryAll")
    public Result<List<Student>> queryAll(){
        List<Student> studentList = studentService.queryAll();
        return ResultUtil.success(studentList);
    }
}
